﻿@model MvcForum.Web.ViewModels.Admin.ListLanguagesViewModel

@{
    ViewBag.Title = "All Languages"; 
}

<div class="panel">
    <div class="panel-heading">
        <h5>@ViewBag.Title</h5>
    </div>
    <div class="panel-content">
        <table class="table table-bordered table-striped">
            <thead>
                <tr>
                    <th style="width: 65px;">
                        Edit
                    </th>
                    <th>
                        Name
                    </th>
                    <th style="width: 65px;">
                        Delete
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var language in Model.Languages)
                {
                    <tr>
                        <td>
                            <a href="@Url.Action("ManageLanguageResourceValues", new { languageId = language.Id })" class="btn-mvc">
                                <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
                            </a>
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => language.Name)
                        </td>
                        <td>
                            @if (!language.IsDefault)
                            {
                                <a href="@Url.Action("DeleteLanguageConfirmation", new { id = language.Id })" class="btn-mvc">
                                    <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                                </a>
                            }
                        </td>
                    </tr>
                }
            </tbody>
        </table>

    </div>
</div>



